package com.gitee.liuzhi.demo.other;

import lombok.extern.slf4j.Slf4j;

/**
 * @Author LiuZhi
 * @Date 2022/3/24 19:36
 * @Description 正确打印日志
 */
@Slf4j
public class PrintLogDemo {

    /**
     * 正确打印日志 <P>
     * 1. 错误日志需要打印参数
     * 2. 把异常对象一同带上
     *
     * @param e Exception
     */
    public void printLog(Exception e) {
        log.error(String.format("Notify sleep member fail. consultantId:[%s], message:[%s] ", 123, e.getMessage()), e);
    }

}
